package com.baidu.mpks.dal.dataaccessplatform;

import com.baidu.mpks.dal.domain.DataAccessSource;
import com.baidu.mpks.dal.domain.DataSourceJobRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DataAccessSourceDao {

    public void addDataAccessSource(DataAccessSource dataAccessSource);

    public List<DataAccessSource> listAllDataAccessSource(
            @Param("keyword") String keyword, @Param("offset") int offset, @Param("pageSize") int pageSize);

    public List<DataAccessSource> listAllDataAccessSourceNoLimit();

    public int listSize(@Param("keyword") String keyword);

    public DataAccessSource findDataAccessSourceById(@Param("id") int id);

    public void delDataAccessSourceById(@Param("id") int id);

    public void addDataSourceJobRelation(DataSourceJobRelation dataSourceJobRelation);
    
    public DataSourceJobRelation getDataSourceJobRelation(@Param("jobId") String jobId);
    
    List<DataAccessSource> scheduleJobQuery(@Param("maxNextTime") long maxNextTime, @Param("pagesize") int pagesize);
    
    int scheduleUpdate(DataAccessSource xxlJobInfo);

    void editDataSource(DataAccessSource dataAccessSourc);

}
